package com.jinly.ryder.database.dao.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.jinly.ryder.common.dao.entity.BaseDO;
import com.jinly.ryder.database.service.model.SqlTaskState;
import com.jinly.ryder.flow.service.model.ApplyStatus;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = false)
@TableName("sql_task")
public class SqlTaskDO extends BaseDO {

    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 申请Id
     */
    @TableField(value = "apply_id")
    private Long applyId;


    /**
     * 申请状态
     */
    @TableField(value = "apply_status")
    private ApplyStatus applyStatus;


    /**
     * 任务状态
     */
    @TableField(value = "task_state")
    private SqlTaskState state;

    /**
     * 数据库Id
     */
    @TableField(value = "database_id")
    private Integer databaseId;

    /**
     * 数据库名称
     */
    @TableField(value = "database_name")
    private String databaseName;

    /**
     * 应用名称
     */
    @TableField(value = "app_name")
    private String appName;

    /**
     * 申请人
     */
    @TableField(value = "apply_user_id")
    private Long applyUserId;

    /**
     * 申请备注
     */
    @TableField(value = "remark")
    private String remark;


}
